{% set page = hook.page %}
{# @var page \Shopware\Storefront\Page\Page #}

{% set criteria = {
    'ids': [ hook.productId ]
} %}

{% set product = services.repository.search('product', criteria).first %}

{% do page.addExtension('myProduct', product) %}
